import { defineStore } from 'pinia';

export const useSidebarStore = defineStore('sidebar', {
    state: () => ({
        isOpen: false,
        groupInfo: '',
        type: '', //workOrder: '工单', archive: '客户档案
        currentId: '',
    }),
    actions: {
        setSidebar(info:any) {
            this.isOpen = info.isOpen;
            this.groupInfo = info.groupInfo;
            this.type = info.type;
            this.currentId = info.currentId;
        }
    }
});